Make dashed border-style work correctly
authorArnaud B <arnaud.bonatti@gmail.com>
Fri, 21 Sep 2018 12:25:23 +0000 (12:25 +0000)
committerArnaud Bonatti <arnaud.bonatti@gmail.com>
Mon, 24 Sep 2018 07:39:55 +0000 (09:39 +0200)
There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail occasionally to render a dashed line if the border-width is too big.

gtk/gtkrenderborder.c

index f0edb8cb0c753891ad1fa721b7ec2ec4b36b7263..1c568532ce4b43ce0e551440142bb464f0749bd9 100644 (file)
@@ -405,8 +405,8 @@ set_stroke_style (cairo_t        *cr,
        */
       if (n == nearbyint (n))
         {
-          segments[0] = 1;
-          segments[1] = 2;
+          segments[0] = line_width;
+          segments[1] = 2 * line_width;
         }
       else
         {